// ================================START====================================
// Template generated from		FRAMEWORKIVY CODE GENERATOR
// Generator Version:			<1.0.0.0>
// Template Creation Time:		<Thursday, 26 May, 2016   12:32:16 AM>
// Template Modification Time:	<Monday, 23 May, 2016   11:22:57 PM>
// Code Generation Time:		<Thursday, 26 May, 2016   12:52:16 AM>
// Workstation ID:				<PRAVESH>
// Current system User ID:		<pravesh kr>
// Entity/Table Name:			<Person>
// ModuleName:			        <UserManagement>
// Description:					<CSharp Class For Entity Dao Unit Test>
// Template File:				<IvyGodeGenDefaultTemplate V1.1.xml>

// Please modify the generated code as per requirement.
// This code generator is just to speed up the stereo type codes
// Complex logic needs to be modified manually.

// This block of comments will not be included in
// the definition of the procedure.
// =========================================================================

using System;

//This Class specific System namespaces
using Microsoft.VisualStudio.TestTools.UnitTesting;

//This Class Specific IvyFramework namespaces
using Ivy.Common.Framework.Base;
using Ivy.Common.Framework.DataAccess;
using Ivy.Common.Framework.GeneralUtility;

using Ivy.UserManagement.Entity;
using Ivy.UserManagement.DataAccess;

namespace Ivy.UserManagement.UnitTest
{
    [TestClass]
    public class PersonDaoUnitTest
    {
        [TestMethod]
        public void PersonInsertTestMethod()
        {
            Person _tempPerson = new Person();
            PersonDao _PersonDao = new PersonDao();

            //Auto Generated attribute should not be supplied from outside.
            //_tempPerson.PersonKey = ???; This is Auto Generated attribute.

            _tempPerson.PersonFirstName = "TEST PersonFirstName Unique_" + StringUtility.GenerateRandomString(6); //Unique Key
            _tempPerson.PersonLastName = "TEST PersonLastName Unique_" + StringUtility.GenerateRandomString(6); //Unique Key
            _tempPerson.PersonSex = "TEST PersonSex Not Unique" ;
            _tempPerson.PersonDateOfBirth = DateTime.Now; //Unique Key
            _tempPerson.PersonPrimaryEmailID = "TEST PersonPrimaryEmailID Unique_" + StringUtility.GenerateRandomString(6); //Unique Key
            _tempPerson.PersonPrimaryEmailVerificationCode = "TEST PersonPrimaryEmailVerificationCode Not Unique" ;
            //_tempPerson.PersonPrimaryEmailIsVerified = ???; This is attribute data type different and should be treated manually.
            _tempPerson.PersonAlternateEmailID = "TEST PersonAlternateEmailID Not Unique" ;
            _tempPerson.PersonPrimaryMobileNumber = "TEST PersonPrimaryMobileNumber Unique_" + StringUtility.GenerateRandomString(6); //Unique Key
            _tempPerson.PersonPrimaryMobileVerificationCode = "TEST PersonPrimaryMobileVerificationCode Not Unique" ;
            //_tempPerson.PersonPrimaryMobileIsVerified = ???; This is attribute data type different and should be treated manually.
            _tempPerson.PersonAlternatePhoneNumber = "TEST PersonAlternatePhoneNumber Not Unique" ;
            _tempPerson.PersonAddressLine1 = "TEST PersonAddressLine1 Not Unique" ;
            _tempPerson.PersonAddressLine2 = "TEST PersonAddressLine2 Not Unique" ;
            _tempPerson.PersonAddressCityName = "TEST PersonAddressCityName Not Unique" ;
            _tempPerson.PersonAddressStateName = "TEST PersonAddressStateName Not Unique" ;
            _tempPerson.PersonAddressCountryName = "TEST PersonAddressCountryName Not Unique" ;
            _tempPerson.PersonAddressPinZipCode = "TEST PersonAddressPinZipCode Not Unique" ;

            _tempPerson.Sys_CreatedByID = "1";
            _tempPerson.Sys_DeleteType = DeleteType.SoftDeleteOnly;
            _tempPerson.Sys_IsDeleted = false;
            _tempPerson.Sys_OrganizationID = -1;

            Assert.IsTrue(_PersonDao.Insert(_tempPerson));
        }

        //[TestMethod]
        //public void PersonUpdateTestMethod()
        //{
        //    Person _tempPerson = new Person();
        //    PersonDao _PersonDao = new PersonDao();

        //    //Please edit and provide a valid value for GetByPrimaryKey() parameter
        //    _tempPerson = _PersonDao.GetByPrimaryKey(int_PersonKey); 

        //    _tempPerson.PersonFirstName = "TEST PersonFirstName Unique_" + StringUtility.GenerateRandomString(6); //Unique Key
        //    _tempPerson.PersonLastName = "TEST PersonLastName Unique_" + StringUtility.GenerateRandomString(6); //Unique Key
        //    _tempPerson.PersonSex = "TEST PersonSex Not Unique" ;
        //    _tempPerson.PersonDateOfBirth = DateTime.Now; //Unique Key
        //    _tempPerson.PersonPrimaryEmailID = "TEST PersonPrimaryEmailID Unique_" + StringUtility.GenerateRandomString(6); //Unique Key
        //    _tempPerson.PersonPrimaryEmailVerificationCode = "TEST PersonPrimaryEmailVerificationCode Not Unique" ;
        //    //_tempPerson.PersonPrimaryEmailIsVerified = ???; This is attribute data type different and should be treated manually.
        //    _tempPerson.PersonAlternateEmailID = "TEST PersonAlternateEmailID Not Unique" ;
        //    _tempPerson.PersonPrimaryMobileNumber = "TEST PersonPrimaryMobileNumber Unique_" + StringUtility.GenerateRandomString(6); //Unique Key
        //    _tempPerson.PersonPrimaryMobileVerificationCode = "TEST PersonPrimaryMobileVerificationCode Not Unique" ;
        //    //_tempPerson.PersonPrimaryMobileIsVerified = ???; This is attribute data type different and should be treated manually.
        //    _tempPerson.PersonAlternatePhoneNumber = "TEST PersonAlternatePhoneNumber Not Unique" ;
        //    _tempPerson.PersonAddressLine1 = "TEST PersonAddressLine1 Not Unique" ;
        //    _tempPerson.PersonAddressLine2 = "TEST PersonAddressLine2 Not Unique" ;
        //    _tempPerson.PersonAddressCityName = "TEST PersonAddressCityName Not Unique" ;
        //    _tempPerson.PersonAddressStateName = "TEST PersonAddressStateName Not Unique" ;
        //    _tempPerson.PersonAddressCountryName = "TEST PersonAddressCountryName Not Unique" ;
        //    _tempPerson.PersonAddressPinZipCode = "TEST PersonAddressPinZipCode Not Unique" ;

        //    _tempPerson.Sys_ModifiedByID = "1";

        //    Assert.IsTrue(_PersonDao.Update(_tempPerson));
        //}

    }
}


